/* 学生模块 */
import {doPost, doFormDate} from '../../utils/request'

/**
 * 登录
 * */
function teacherLogin ({params, callback}) {
  doPost({
    url: 'teacher/login/login',
    params,
    success: res => {
      callback(res)
    }
  })
}
// 获取短信验证码
function teacherSendMsg ({params, callback}) {
  doPost({
    url: 'teacher/Send/sendmsg',
    params,
    success: res => {
      callback(res)
    }
  })
}
// 获取用户信息
function teacherPersonal ({params, callback}) {
  doPost({
    url: 'teacher/user/personal',
    params,
    success: res => {
      callback(res)
    }
  })
}
// 完善教师信息
function teacherPerfectIndividual ({params, callback}) {
  doFormDate({
    url: 'teacher/user/perfect_individual',
    params,
    success: res => {
      // 可以对数据进行处理
      callback(res)
      // console.log(res)
    }
  })
}
// 学生列表
function teacherGetStudentr ({params, callback}) {
  doPost({
    url: 'teacher/Curriculum/getstudent',
    params,
    success: res => {
      callback(res)
    }
  })
}

function teacherAddStudent ({params, callback}) {
  doPost({
    url: 'teacher/Curriculum/addstudent',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 消息首页
function teacherMessagIindex ({params, callback}) {
  doPost({
    url: 'teacher/Information/message_index',
    params,
    success: res => {
      callback(res)
    }
  })
}
// 消息管理
function teacherMessagManagement ({params, callback}) {
  doPost({
    url: 'teacher/Information/message_management',
    params,
    success: res => {
      callback(res)
    }
  })
}
// 消息管理 发送消息  获取发送对象
function teacherMessageObject ({params, callback}) {
  doPost({
    url: 'teacher/Information/message_object',
    params,
    success: res => {
      callback(res)
    }
  })
}
// 消息管理 发送消息
function teacherMessageCourse ({params, callback}) {
  doPost({
    url: 'teacher/Information/message_course',
    params,
    success: res => {
      callback(res)
    }
  })
}
// 查看海报
function teacherLookPoster ({params, callback}) {
  doPost({
    url: 'teacher/Information/look_poster',
    params,
    success: res => {
      callback(res)
    }
  })
}
// 编辑海报
function teacherPoster ({params, callback}) {
  doFormDate({
    url: 'teacher/Information/poster',
    params,
    success: res => {
      callback(res)
    }
  })
}
// 我的课程列表
function teacherIndexCur ({params, callback}) {
  doPost({
    url: 'teacher/Curriculum/index_cur',
    params,
    success: res => {
      callback(res)
    }
  })
}

/**
 * 添加修改课程
 * */
function addCourse ({params, callback}) {
  doPost({
    url: 'teacher/Curriculum/add_cur',
    params,
    success: res => {
      callback(res)
    }
  })
}

/**
 * 课程表首页
 * */
function teachetCourseIndex ({params, callback}) {
  doPost({
    url: 'teacher/Curriculum/curriculum_list',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 点击首页课程
function teacherCourseDetail ({params, callback}) {
  doPost({
    url: '/teacher/Curriculum/curriculum_find',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 评价课程
function teacherEditAssess ({params, callback}) {
  doPost({
    url: '/teacher/Curriculum/curriculum_evaluate',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 课程列表
function teacherCourseList ({params, callback}) {
  doPost({
    url: '/teacher/Curriculum/teacher_kecheng',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 课程详情
function teacherCourseListDetail ({params, callback}) {
  doPost({
    url: '/teacher/Curriculum/curriculum_look',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 学生详情
function teacherStudentDetail ({params, callback}) {
  doPost({
    url: '/teacher/Curriculum/detailslook',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 学生编辑
function teacherStudentEditor ({params, callback}) {
  doPost({
    url: '/teacher/Curriculum/detailsstudent',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 审批打卡
function teacherCheckStudent ({params, callback}) {
  doPost({
    url: '/teacher/Curriculum/student_open',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 请假列表
function teacherLeaveList ({params, callback}) {
  doPost({
    url: '/teacher/Curriculum/student_leave',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 请假详情
function teacherLeaveDetail ({params, callback}) {
  doPost({
    url: '/teacher/Curriculum/leave_details',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 审批请假
function teacherLeaveApprove ({params, callback}) {
  doPost({
    url: '/teacher/Curriculum/leave_approve',
    params,
    success: res => {
      callback(res)
    }
  })
}

// vip课程列表
function teacherVIPList ({params, callback}) {
  doPost({
    url: '/teacher/Curriculum/curriculum_vip',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 学生签到详情VIP
function teacherStudentVIPCheck ({params, callback}) {
  doPost({
    url: '/teacher/Curriculum/vip_signdetails',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 集体课列表
function teacherCourseRecord ({params, callback}) {
  doPost({
    url: '/teacher/Curriculum/collective_signdetails',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 集体课签到记录
function teacherRecodeDetail ({params, callback}) {
  doPost({
    url: '/teacher/Curriculum/collective_details',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 教师发出的消息
function teacherSendMessage ({params, callback}) {
  doPost({
    url: '/teacher/Information/send_news',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 删除学生
function teacherDelStudent ({params, callback}) {
  doPost({
    url: '/teacher/Curriculum/student_del',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 催学费
function teacherUrge ({params, callback}) {
  doPost({
    url: '/teacher/Curriculum/student_Pay',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 临时调课
function teacherChangeCourse ({params, callback}) {
  doPost({
    url: '/teacher/Curriculum/curriculum_adjust',
    params,
    success: res => {
      callback(res)
    }
  })
}

export default {
  teacherLogin,
  teacherSendMsg,
  teacherPersonal,
  teacherPerfectIndividual,
  teacherGetStudentr,
  teacherMessagIindex,
  teacherMessagManagement,
  teacherMessageObject,
  teacherMessageCourse,
  teacherLookPoster,
  teacherPoster,
  teacherIndexCur,
  addCourse,
  teachetCourseIndex,
  teacherCourseDetail,
  teacherEditAssess,
  teacherCourseList,
  teacherStudentDetail,
  teacherStudentEditor,
  teacherCheckStudent,
  teacherLeaveList,
  teacherLeaveDetail,
  teacherLeaveApprove,
  teacherCourseListDetail,
  teacherVIPList,
  teacherStudentVIPCheck,
  teacherCourseRecord,
  teacherAddStudent,
  teacherRecodeDetail,
  teacherSendMessage,
  teacherDelStudent,
  teacherUrge,
  teacherChangeCourse
}
